﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Common.ECS
{
    public abstract class System <TEntity>: IInitializeSystem<TEntity>, IExcuteSystem where TEntity:IEntity
    {
        public Context<TEntity> Context;
        public bool Init(Context<TEntity> context)
        {
            this.Context = context;
            OnInit();
            return true;
        }

        public virtual void OnInit()
        {

        }

        public virtual void TraversalContexts()
        {

        }
        public abstract void Excute();


    }
}
